✅ test(unxts-linalg): cover QuantityMatrix short_name "QM" - #796
Merged
nstarman merged 1 commit intoJul 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds coverage in the unxts.linalg package to ensure QuantityMatrix’s wadler-lindig pretty-printing honors the "QM" short name (and the QM alias), aligning it with existing Quantity / ParametricQuantity short-name behavior.
Changes:
- Add
packages/unxts.linalg/tests/test_printing.pyto assert default/full-name printing vsuse_short_name=Trueprinting forQuantityMatrix. - Define
QuantityMatrix.short_name: ClassVar[str] = "QM"so the printing path can renderQM(...)when requested.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/unxts.linalg/tests/test_printing.py | New tests covering QuantityMatrix / QM short-name behavior in wadler-lindig output. |
| packages/unxts.linalg/src/unxts/linalg/_src/_quantity_matrix.py | Adds short_name = "QM" as a ClassVar for correct short-name pretty-printing. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #796 +/- ##
==========================================
+ Coverage 91.98% 95.07% +3.09%
==========================================
Files 83 53 -30
Lines 3766 3086 -680
Branches 313 231 -82
==========================================
- Hits 3464 2934 -530
+ Misses 227 98 -129
+ Partials 75 54 -21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Mirror the Quantity/ParametricQuantity printing tests: assert `QuantityMatrix.short_name == "QM"`, that it renders its full class name by default, and that `use_short_name=True` renders `QM(...)`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nstarman
force-pushed
the
claude/quantitymatrix-short-name-test
branch
from
July 24, 2026 15:54
1478253 to
1471fb3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a printing test module for
QuantityMatrix, mirroring the existingQuantity/ParametricQuantityshort-name tests. It asserts:QuantityMatrix.short_name == "QM"(and via theQMalias)use_short_name=TruerendersQM(...)Stacking
Stacked on #795 (which adds
short_name = "QM"). Until #795 merges, the diff here also shows that one-line change; it collapses to just the new test once #795 lands inmain.🤖 Generated with Claude Code